package com.cskaoyan.controller;/*
 *  @Author tsuki
 *  @Date 2021/4/12
 *  @Description
 *
 */

import com.cskaoyan.bean.market.Brand;
import com.cskaoyan.service.market.BrandService;
import com.cskaoyan.vo.BaseRespVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/wx/brand")
public class WxBrandController {
    @Autowired
    BrandService brandService;

    @RequestMapping("detail")
    public BaseRespVo detail(Integer id){
        Brand brand = brandService.wxBrandQuery(id);
        return BaseRespVo.ok(brand);
    }

    @RequestMapping("list")
    public BaseRespVo list(Integer page,Integer size){
        Map<String,Object> map= brandService.wxBrandListQuery(page,size);
        return BaseRespVo.ok(map);
    }
}
